<template>
	<view class="mian">		
		<view class="class_h" style="background-color: #fff">
			<view class="top" @click="return_step">					
				<image src="../../../static/resource/back.png" mode="aspectFill" style="width: 74px;height: 30px;"></image>				
			</view>
			<text class="task_name">订单管理</text>
		</view>	
		
		<view class="content_one">
			<view class="flex pt-50 pl-30 pr-30">
				<view class="flex flex-direction justify-between">
					<view class="containersss">
					    <view class="member-bg"  :style="{ backgroundImage: `url(${userInfo.token ? userInfo.member_level : 'https://tangmaibao.site/static/upload/f42b5b566c89345e/e83497a25fc61e7d.png'})`}"></view>
						<image class="mine__bg--avatar" mode="aspectFill" style="background:" v-if="!userInfo.token" src="/static/mine/avatar.png" @click="userInfo.token?setBase():$routers.routeToLogin(recommendId)"></image>
						<image class="mine__bg--avatar" mode="aspectFill" style="background:" v-if="userInfo.token" :src="userInfo.wx_icon?userInfo.wx_icon:'/static/mine/avatar.png'" @click="setBase()"></image>	
					</view>					
				</view>
				<view class="flex flex-direction" style="margin-left: 30px;">
					<text class="text-bold">{{userInfo.nickName}}</text>
					<view class="flex flex-direction mt-20" style="color: #666666;">
						<view class="flex" style="gap: 18px;">
							<text class="mt-10">性別：{{userInfo.gender}}</text>
							<text class="mt-10">身高：{{userInfo.heights}}</text>
						</view>
						<view class="flex mt-10" style="gap: 18px;">
							<text class="mt-10">年龄：{{userInfo.age}}</text>
							<text class="mt-10">体重：{{userInfo.weights}}</text>
						</view>
					</view>					
				</view>
			</view>
			
			<view class="flex justify-center align-center pt-50 mb-20">
				<image src="../../../static/order/Line59.png" style="height: 1px;"></image>
			</view>
			
			<view class="flex justify-between  pt-30 pl-30 pr-30 ">
				<view class="flex health">
					<text class="h_name">体重(斤)</text>
					<text class="h_text">118</text>
				</view>
				<view class="flex health">
					<text class="h_name">身高(厘米)</text>
					<text class="h_text">174</text>
				</view>
			</view>
			
			<view class="flex pt-30 pl-30 pr-30 align-center text-center ">
				<text class="flex" style="width: 170rpx;color: #333333; font-size: 32rpx;">打卡进度</text>
				<view class="progress-wrap">
				    <view class="progress-bg">
					
				      <view
				        class="progress-bar"
				        :style="{ width: progress + '%' }"
				      >
				        <text class="progress-text">{{ progress }}%</text>
				      </view>
				    </view>
				</view>
			</view>
			
			<view class="flex justify-between  pt-30 pl-30 pr-30 pb-30">
				<view class="flex health_task">
					<view class="flex justify-start align-center text-center pt-20 pl-20">
						<view class="flex">
							<image src="/static/resource/pressure_icon.png" mode="aspectFill" style="width: 18px;height: 18px;"></image>
						</view>
						<text class="effect_t ml-15">近期血糖</text>
					</view>
					<view class="flex flex-direction pl-30 pt-40">
						<text class="" style="color: #999999;">达标值</text>
						<view class="flex mt-15" style="color: #333333;">
							<text class="">5.1</text>							
							<text class="">mmol/L</text>
						</view>						
					</view>
					
					<view class="flex flex-direction pl-30 pt-40 pb-25">
						<text class="" style="color: #999999;">异常值</text>
						<view class="flex mt-15" style="color: #333333;">
							<text class="">8</text>							
							<text class="">mmol/L</text>
						</view>						
					</view>
					
				</view>
				<view class="flex health_task">
					<view class="flex justify-start align-center text-center pt-20 pl-20">
						<view class="flex">
							<image src="/static/resource/pressure_icon.png" mode="aspectFill" style="width: 18px;height: 18px;"></image>
						</view>
						<text class="effect_t ml-15">近期血压</text>
					</view>
					<view class="flex flex-direction pl-30 pt-40">
						<text class="" style="color: #999999;">收缩压</text>
						<view class="flex mt-15" style="color: #333333;">
							<text class="">5.1</text>							
							<text class="">mmHg</text>
						</view>						
					</view>
					
					<view class="flex flex-direction pl-30 pt-40 pb-25">
						<text class="" style="color: #999999;">舒张压</text>
						<view class="flex mt-15" style="color: #333333;">
							<text class="">8</text>							
							<text class="">mmHg</text>
						</view>						
					</view>
				</view>
			</view>
			
			
		</view>
		
		<view class="content_two">
			<view class="flex pt-30 pl-30 text-bold" style="color: #333333;" >
				健康指数
			</view>
			<TimeCurveChart
				  canvas-id="myCurve"
				  :width="360"
				  :height="220"
				  :data="chartData"
				/>
			</view>
			
		<view class="content_two " style="margin-bottom: 80rpx;"> 
			<view class="flex pt-30 pl-30 text-bold border-b pb-25" style="color: #333333;" >
				健康建议
			</view>
			<view class="flex pl-30 pt-20 pr-30 pb-30" style="font-size: 28rpx;line-height: 44rpx; color: #666666;">
				近一周血糖 存在波动，但整体呈下降趋势，请注意保持健康生活方式！
			</view>
		</view>
		
		
	</view>		
	
</template>

<script>
	import pop from "@/components/pop/pop";
	import TimeCurveChart  from '@/components/dui-line-chart/TimeCurveChart.vue'
	export default {
		 components: {
		    "regional-selection": pop,
			TimeCurveChart
		  },		  
		data() {
			return {	
				...getApp().globalData.config,
				progress:10,
				chartData: [
				   { time: "08:00", value: 90 },
				   { time: "10:00", value: 100 },
				   { time: "12:00", value: 80 },
				   { time: "14:00", value: 110 },
				   { time: "16:00", value: 95 }
				],
				userInfo:{}
            }
		},
		onShow() {
			
			this.userInfo=uni.getStorageSync('userInfo');
			
		},	
		onLoad(events) {
		
			
		},
		methods: {
			...getApp().globalData.function,
			
			return_step(){
				this.$routers.router('/pages/mine/index','switchTab') 
			}
		}
	}
</script>

 
<style>

 @import "./index.css";




</style>
